import request from '@/utils/request'

// 查询客户产品关联列表
export function listCustomerProduct(query) {
  return request({
    url: '/mtool/customerProduct/list',
    method: 'get',
    params: query
  })
}

// 查询客户产品关联详细
export function getCustomerProduct(customerId) {
  return request({
    url: '/mtool/customerProduct/' + customerId,
    method: 'get'
  })
}

// 新增客户产品关联
export function addCustomerProduct(data) {
  return request({
    url: '/mtool/customerProduct',
    method: 'post',
    data: data
  })
}

// 修改客户产品关联
export function updateCustomerProduct(data) {
  return request({
    url: '/mtool/customerProduct',
    method: 'put',
    data: data
  })
}

// 删除客户产品关联
export function delCustomerProduct(customerId) {
  return request({
    url: '/mtool/customerProduct/' + customerId,
    method: 'delete'
  })
}

// 导出客户产品关联
export function exportCustomerProduct(query) {
  return request({
    url: '/mtool/customerProduct/export',
    method: 'get',
    params: query
  })
}

// 查询产品信息列表
export function listProduct(query) {
  return request({
    url: '/mtool/product/list',
    method: 'get',
    params: query
  })
}

// 导入产品信息
export function importProduct(data) {
  return request({
    url: '/mtool/customerProduct/importProduct',
    method: 'post',
    params: data
  })
}
